import requests

from utils.font import get_font_maps
font_maps =get_font_maps("./static/font/file")
def parse_fild(value):
    s = value
    result = ""
    for  items in s.split("&")[1:]:
        result += font_maps[items.replace("#","0")]
    return result


url = "https://www.shixiseng.com/app/interns/search/v2?build_time=1763387347388&page=2&type=intern&keyword=python%E7%88%AC%E8%99%AB&area=&months=&days=&degree=&official=&enterprise=&salary=-0&publishTime=&sortType=&city=%E5%85%A8%E5%9B%BD&internExtend="
header = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 Edg/141.0.0.0",

}

res = requests.get(url,headers=header)

print(res.text)

for items in res.json()['msg']["data"]:
    print(items['maxsal'])
    print(items["cname"],parse_fild(items['maxsal']),parse_fild(items['minsal']),)




